package com.neuedu.shop.controller;


import com.neuedu.shop.service.ProductService;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;


import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author BL
 * @since 2021-04-10
 */
@Controller
@RequestMapping("/product")
public class ProductController {
    @Resource
    private ProductService productService;
    @RequestMapping(value = "/products",method = RequestMethod.GET)
    public String selectProductAll(ModelMap map){
        map.addAttribute("products",productService.selectList(null));
        return "products.jsp";
    }

}

